package com.nai365.nart.member.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nai365.nart.member.entity.UserMoneyLog;
import com.nai365.nart.member.mapper.UserMoneyLogServiceMapper;
import com.nai365.nart.member.service.UserMoneyLogService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserMoneyLogServiceImpl  extends ServiceImpl<UserMoneyLogServiceMapper, UserMoneyLog> implements UserMoneyLogService {
	@Override
	public List<UserMoneyLog> findUserMoneyLogList(Long userId) {
		LambdaQueryWrapper<UserMoneyLog> userMoneyLogLambdaQueryWrapper = new LambdaQueryWrapper<>();
		userMoneyLogLambdaQueryWrapper.eq(UserMoneyLog::getUserId,userId);

		return this.list(userMoneyLogLambdaQueryWrapper);
	}

	@Override
	public Boolean saveUserMoneyLog(UserMoneyLog userMoneyLog) {
		return this.save(userMoneyLog);
	}
}
